# $Id: PKGBUILD 88072 2013-04-10 22:42:59Z dwallace $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Jason St. John <jstjohn .. purdue . edu>

pkgname=vim-systemd
pkgver=20130410
pkgver(){
	date +%Y%m%d
}
pkgrel=1
pkgdesc="Vim syntax highlighting for systemd unit files"
arch=('any')
url="http://fedorapeople.org/cgit/wwoods/public_git/vim-scripts.git/"
license=('custom')
depends=('vim')
source=("syntax-systemd.vim::http://fedorapeople.org/cgit/wwoods/public_git/vim-scripts.git/plain/syntax/systemd.vim"
        "ftdetect-systemd.vim::http://fedorapeople.org/cgit/wwoods/public_git/vim-scripts.git/plain/ftdetect/systemd.vim"
        "syntax-udev.vim::http://fedorapeople.org/cgit/wwoods/public_git/vim-scripts.git/plain/syntax/udev.vim"
        "ftdetect-udev.vim::http://fedorapeople.org/cgit/wwoods/public_git/vim-scripts.git/plain/ftdetect/udev.vim"
        '0001-Add-more-syntax-keywords-for-service-and-socket-file.patch')
md5sums=('75071aeb14c1db7a9c92cd5839691ccc'
         'b022fcc3ddc10a49a52e960868924103'
         '3089ca7384668a4a6ccbee979663599f'
         '8c49e2ad82ff1b1dca1defbdbbc199fd'
         '69ed799ec3c7bc9d07284085d17af243')

prepare(){
	# Patch submitted upstream but not applied in Git tree
	patch -Np0 --follow-symlinks -i "$srcdir/0001-Add-more-syntax-keywords-for-service-and-socket-file.patch"
}
package() {
	cd "$srcdir"


	install -Dm644 syntax-systemd.vim "$pkgdir/usr/share/vim/vimfiles/syntax/systemd.vim"
	install -Dm644 ftdetect-systemd.vim "$pkgdir/usr/share/vim/vimfiles/ftdetect/systemd.vim"
	install -Dm644 syntax-udev.vim "$pkgdir/usr/share/vim/vimfiles/syntax/udev.vim"
	install -Dm644 ftdetect-udev.vim "$pkgdir/usr/share/vim/vimfiles/ftdetect/udev.vim"

}
